<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 *
 * 教务模块AJAX
 */
class Ajax_jiaowu extends MY_Controller {

	/**
	 * 根据校区获取班级AJAX
	 * @param  [type] $campus_id [description]
	 * @return [type]            [description]
	 */
	function get_class_by_student($student_id){
		$this->load->model('Classo2o_model');
		$class = $this->Classo2o_model->get_class_simple_by_student($student_id);
		print_r(json_encode($class));exit;
	}

	/**
	 * 根据校区获取班级list
	 * @param  [type] $campus_id [description]
	 * @return [type]            [description]
	 */
	function get_class_by_campus($campus_id){
		$this->load->model('Classo2o_model');
		$class = $this->Classo2o_model->get_class_simple_by_school_campus($campus_id);
		print_r(json_encode($class));exit;
	}

	/**
	 * 根据班级ID获取学员list
	 * 
	 * @param  [type] $class_id [description]
	 * @return [type]           [description]
	 */
	function get_student_by_campus($campus_id){
		$this->load->model('Student_model');
		$student_list = $this->Student_model->get_student_simple_by_campus($campus_id);
		print_r(json_encode($student_list));exit;
	}

}